home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-2.iso
/
os2
/
gnucal.zip
/
gcal-us.info-3
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1995-12-20
|
45KB
|
925 lines
This is Info file ./gcal-us.info, produced by Makeinfo-1.63 from the
input file ./doc/tex/gcal-us.texi.
This file documents Gcal, a program for printing calendars. It
displays a calendar for a month or for a year, eternal holiday lists
and fixed date warning lists; in many ways. Gcal correctly omits the
dates that were skipped when the current Gregorian calendar replaced
the earlier Julian calendar.
Copyright (C) 1994, 1995 Thomas Esken
This is the first edition of the Gcal documentation.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
Any suggestions, improvements, extensions, bug reports, donations,
proposals for contract work, and so forth are welcome! Please send
them directly to my Email address. If you like my work, I'd appreciate
a postcard from you!
\\\_''/'
-------------------------oOO (/o-o\) OOo-------------------------
Thomas Esken o (. " .) o Internet :
Im Hagenfeld 84 \___) ~ (___/ <esken@uni-muenster.de>
D-48147 M"unster; GERMANY Phone : (+49) 0251 232585
File: gcal-us.info, Node: Fixed date warnings, Next: Todays calendar, Prev: Eternal holidays, Up: Top
Fixed date warnings
*******************
This chapter describes how to use the *fixed date warning* feature of
Gcal. For that purpose, you may create a Gcal resource file for
showing fixed dates/appointments (*note Resource file::.).
Each time you execute Gcal in simple single month mode, i.e. no
explicit month, year or fiscal year is given in the command line, but
the *fixed date warning* argument, e.g.:
gcal --list-of-fixed-dates
gcal -c
it checks the resource file for dates and processes those that refer to
the actual (==todays) date. Then Gcal displays all fixed date warnings
found in the resource file, that refer to the actual day
(week/month/year) of the actual year without a leading calendar.
Some more examples:
gcal -ce
gcal -cw-
gcal -c-m
gcal -c-y-
gcal -jcb -c-et
gcal -cey-
gcal -jc -cey
The fixed date warnings can be displayed in different ways:
In case you start Gcal with the *fixed date warning* argument and/or
a month and/or an explicit year or fiscal year; respectively with the
special 3-Month mode command, e.g.:
gcal -c july
gcal -ce 7 1994
gcal -c-y 7/1994
gcal -c 7:1993
gcal -c 1993
gcal -c .
gcal -c .+
Gcal displays a (three) month / year calendar of the specified
respectively actual month / year and trailing those fixed date warnings
found in the resource file, that refer to the given period; the warning
level is same as `-cy' option if the warning period refers to a year or
fiscal year or to a three month period respectively is same as `-cm'
option if the warning period refers to a month.
In case you start Gcal without an explicit date and the *fixed date
warning* argument *in connection with* the *eternal holiday list*
argument, e.g.:
gcal -c -n
gcal -Cm -n
gcal -Cl1224 -n
gcal -cl3+ -n
then Gcal displays all fixed date warnings found in the resource file,
that refer to the requested period and trailing all holidays of the
eternal holiday list that refer to the whole actual year without a
leading calendar. For more details how to use an *eternal holiday
list*, see *Note Eternal holidays::.
*Annotation to previous examples:*
In case an additional *standard/special calendar format* argument
(*note `--type=special|standard': Calendar options.) or an additional
*starting day of week* argument (*note `--starting-day[=ARG]': Calendar
options.) (except the `-s 0' option respectively the `--starting-day=0'
option) is found in the command line, e.g.:
gcal -c -n -i
gcal -c -i-
gcal -n -i- :
gcal -n -s Sunday
Gcal displays a leading month, year or fiscal year calendar before all
other lists.
Each time you execute Gcal in simple single year mode, i.e. no
explicit month, year or fiscal year is given in the command line, but
the *fixed date warning* argument (with optional modifiers) and the
*number of blocks* argument (*note `--blocks=ARG': Calendar options.),
e.g.:
gcal -c --blocks=3
gcal -C-em -b 3
gcal -c-t -b 6 -jc
it checks the resource file for dates and processes those that refer to
the actual (==todays) date! Gcal displays a leading year calendar and
all fixed date warnings, found in the resource file, that refer to the
actual day (week/month/year) of the actual year.
You can list fixed date warnings of past, present or future
month/years, too. This can be done on the one hand, if you use the
`%DATE' option in the fashion you require (*note Actual date
modifier::.), and on the other hand, if a command respectively a *list*
or *range* of commands is used.
For example:
`gcal -c 1993'
List all date entries related to entire 1993 and all eternal date
entries related to entire 1993 in ascending order; the warning
level is same as `-cy' option.
`gcal -c- july:1993'
List all date entries related to fiscal year - starting in July
1993 and ending in June 1994 - and all eternal date entries
related to fiscal year - starting in July 1993 and ending in June
1994 - in descending order; the warning level is same as `-cy'
option.
`gcal -ce july 1993'
List all date entries related to July 1993 and all eternal date
entries related to July 1993 and all eternal holiday entries
related to July 1993 in ascending order; the warning level is same
as `-cm' option.
`gcal -c-e 1993'
List all date entries related to entire 1993 and all eternal date
entries related to entire 1993 and all eternal holiday entries
related to entire 1993 in descending order; the warning level is
same as `-cy' option.
* Menu:
* Resource file:: How to use a Resource file.
* Resource file examples:: Examples of Resource file entries.
File: gcal-us.info, Node: Resource file, Next: Resource file examples, Prev: Fixed date warnings, Up: Fixed date warnings
Resource file
=============
This sections describes how to use a "resource file", which contains
fixed dates and appointments. The name of the standard resource file is
`./.gcalrc' (1).
Gcal uses a special file searching mechanism:
1. The Gcal program expects the standard resource file in the actual
directory and looks in this directory first.
2. If the above action fails, Gcal inspects that directory, which is
referenced in the environment variable `HOME'. If no `HOME'
environment variable is defined and set, Gcal omits this step.
*Note HOME: Environment variables.
3. If the above action fails, Gcal scans the directories, which are
referenced in the environment variable `GCALPATH' (2) (*note
GCALPATH: Environment variables.), for the standard resource file.
The `GCALPATH' environment variable contains a (`:')
colon-separated list of directories. If no such environment
variable is defined and set, Gcal omits this step.
4. If the above action fails, Gcal inspects the *user library*
directory (normally `$HOME/lib/gcal-lib') for detecting the
standard resource file. This directory is a directory relative to
the `HOME' directory. If an environment variable
`GCAL_USR_LIBDIR' is set, Gcal appends the contents of this
environment variable to the contents of the `HOME' environment
variable and tries to use that directory first instead of using
the burned-in default name of that directory (*note
GCAL_USR_LIBDIR: Environment variables.). If no `HOME'
environment variable is defined and set, Gcal omits this step.
5. If all above actions fail, Gcal inspects the *system library*
directory (normally `/usr/lib/gcal-lib' or
`$(prefix)/lib/gcal-lib') for detecting the standard resource
file. This directory is a directory absolute the
*root*/*$(prefix)* directory. If an environment variable
`GCAL_SYS_LIBDIR' is set, Gcal tries to use that directory first
instead of using the burned-in default name of that directory
(*note GCAL_SYS_LIBDIR: Environment variables.).
If the standard resource file is not found during steps 1...5 of the
file searching mechanism, no fixed date warnings will be created!
If a `-f|F NAME[+...]' respectively `--resource-file=ARG' command
line argument is given, a file NAME will be used for the resource file
instead of the standard resource file. *Note `--resource-file=ARG':
Date warning options.
An "path name" contains one ore more `/' (slash) characters and
denotes a file, which fixed access path either starts from the root
directory, like `/foo/bar/file', or from the actual directory, like
`./bar/file' or `../bar/file'. If NAME is a pathname:
In case file NAME is found, Gcal will use it.
In case file NAME is not found, Gcal will not use it.
A "simple" file name does not contain a `/' (slash) character, this
means no fixed access path, like `file'. If NAME is a simple file name:
Gcal tries to find this file NAME using the previously explained
file searching mechanism.
* Menu:
* Structure of resource file:: How to write a Resource file.
* Date part of a line:: How to write the Date part.
* Text part of a line:: How to write the Text part.
* Comment line:: What is a Comment line?
* Include statements:: What are Include statements.
* Special macro texts:: What is a Special macro text.
* Date variables:: How Date variables can be used.
---------- Footnotes ----------
(1) On OS/2, MS-DOS and some other systems, the name of the
*standard* resource file is `./gcalrc'.
(2) The environment variable `PATH' is used on `MSDOS' for this, and
the environment variable `DPATH' is used on `OS/2' for this.
File: gcal-us.info, Node: Structure of resource file, Next: Date part of a line, Prev: Resource file, Up: Resource file
Structure of resource file
--------------------------
A Gcal resource file is a plain ASCII text file. This text file may be
created by any text editor or by redirecting the *standard output
channel* to a file, e.g.:
% echo '19930217 Text' >> resource-file
A special but simple line structure is required so Gcal is able to
interpret its contents. Each fixed date warning entry in a resource
file must be splitted into two parts, namely a *date part* and a *text
part*, which *must* be separated by *one* "whitespace" character (Tab,
Space, Form-Feed ...) minimum (except of *local date variable*
assignments/operations), e.g.:
date part *whitespace* text part
or more concrete, e.g.:
YYYY[MM[DD|WWW[N]]]*whitespace*TEXT
or much more concrete, e.g.:
19940217 I'm the text!
File: gcal-us.info, Node: Date part of a line, Next: Text part of a line, Prev: Structure of resource file, Up: Resource file
Date part of a line
-------------------
The structure of a "date part" - which gives Gcal the information at
what date a fixed date happens - of a line in the resource file is
*Either*: `YYYY[MM[DD|WWW[N]]]'
`YYYY'
(4 digits), is the year including the century (range
0000...9999). Leading zeroes are required in case given year
is less than 1000 and other components of the date part are
trailing the year.
`MM'
(2 digits or 3 characters), is the month (range 00...12 or
99, respectively Jan, Feb...). A given 99 for the month
means the last month of the year (== December). Leading
zeroes are required in case given month is less than 10 and
other components of the date part are trailing the month.
`DD'
(2 digits), is the day (range 00...31 or 99). A given 99 for
the day means the last day of the month. Leading zeroes are
required in case given day is less than 10 and other
components of the date part are trailing the day.
`WWW'
(2...3 characters), is a short weekday name (range Mon...Sun).
`N'
(1 digit), is the N'th weekday WWW of month (range 1...5 or
9).
* N == 1...5
N'th weekday WWW of month.
* N == 9
Last weekday WWW of month.
*Or*: `YYYY*d|wN[WWW]'
`YYYY'
(4 digits), is the year including the century (range
0000...9999). Leading zeroes are required in case given year
is less than 1000 and other components of the date part are
trailing the year.
`*d'
(2 characters), is the reference to an ordinary date.
`*w'
(2 characters), is the reference to a date of an
ISO-8601:1988 week.
`N'
(1...3 digits), is the value in days or in weeks, the fixed
date occurs. If the computed date doesn't occur in year,
i.e. is off the year bounds, the fixed date warning message
is suppressed.
`WWW'
(2...3 characters), is a short weekday name (range Mon...Sun).
*Or*: `YYYY@e|DVAR[[+|-]N]'
`YYYY'
(4 digits), is the year including the century (range
0000...9999). Leading zeroes are required in case given year
is less than 1000 and other components of the date part are
trailing the year.
`@e'
(2 characters), is the reference to Easter Sunday's date.
`@DVAR'
(2 characters), is the reference to a date variable.
`[+|-]N'
(1...4 alphanumeric characters), is the optional displacement
value in days, the fixed date occurs relative to Easter
Sunday's date or date variables date. If the computed date
doesn't occur in year, i.e. is off the year bounds, the fixed
date warning message is suppressed.
*Or*: `YYYY@e|DVAR[+|-]NWWW'
`YYYY'
(4 digits), is the year including the century (range
0000...9999). Leading zeroes are required in case given year
is less than 1000 and other components of the date part are
trailing the year.
`@e'
(2 characters), is the reference to Easter Sunday's date.
`@DVAR'
(2 characters), is the reference to a date variable.
`[+|-]NWWW'
(3...7 alphanumeric characters), is the optional displacement
value in weekdays, the fixed date occurs relative to Easter
Sunday's date or date variables date. If the computed date
doesn't occur in year, i.e. is off the year bounds, the fixed
date warning message is suppressed.
*Or*: Any of these date variable assignments respectively operations...
DVAR=MMDD
DVAR=MMWWWN
DVAR=*dN[WWW]
DVAR=*wN[WWW]
DVAR=DVAR
DVAR++
DVAR--
DVAR+=N
DVAR-=N
*Please note:*
* If YYYY is specified as 0000:
The month and day are assumed to be annual events and the *text
part* will be displayed for any year.
* If MM is not given or specified as 00:
The day is assumed to be a monthly event for the specified year
and the *text part* will be displayed for any month.
* If DD is not given or specified as 00:
Each day is assumed to be a daily event for the specified year and
month and the *text part* will be displayed for any day.
* If WWW is specified as a short (2...3 characters) weekday name,
e.g. `Mon, Tue...':
The given weekday name is assumed to be a weekly event for the
specified year and month and the *text part* will be displayed for
any week.
File: gcal-us.info, Node: Text part of a line, Next: Comment line, Prev: Date part of a line, Up: Resource file
Text part of a line
-------------------
The "text part" of a line in a resource file can be any text you like.
The length of the text is unlimited, but the whole text of a fixed date
warning (date part, highlighting sequences and text part) is always
truncated to `MAXLEN' characters (actually 1024).
Furthermore, you can split the text of a *long* resource file line.
Each time a `~' (tilde) character is found in the text part, this
character is replaced by a real `\n' (newline) character.
You may quote the `~' (tilde) character - in case this character
itself is needed - by placing a `\' (backslash) character before it,
e.g. `\~'.
If you need the characters `\~' itself, you have to quote the `\'
(backslash) character by itself, e.g. `\\~'.
A line of the resource file is continued on the next line if a `\-\n'
backslash-newline character sequence is found, e.g.:
the line:
000000Mo Every Monday
and the line:
000000Mo \
Every \
Monday
are identical.
File: gcal-us.info, Node: Comment line, Next: Include statements, Prev: Text part of a line, Up: Resource file
Comment line
------------
A line beginning with a `;' (semicolon) character in the resource file
is treated as a remark and will not be used by Gcal! Any *whitespace*
characters may lead the remark character.
File: gcal-us.info, Node: Include statements, Next: Special macro texts, Prev: Comment line, Up: Resource file
Include statements
------------------
You may add "#include" statements in a resource file (a mechanism
similar the method, which is used by the C Preprocessor) for searching
and loading further resource files, e.g.:
1. #include "foo/bar"
2. #include <bar>
The first *#include* statement stimulates Gcal to load the file `bar'
from the directory `foo' using steps 1...5 of the previously explained
mechanism, which is used for searching files (*note File searching
mechanism: Resource file.).
The second *#include* statement stimulates Gcal to load the file `bar'
from the user respectively system library directory using steps 4...5 of
the previously explained mechanism, which is used for searching files.
*Please note:*
Included files may not include other files, i.e. recursive or
sub-includes are not permitted!
File: gcal-us.info, Node: Special macro texts, Next: Date variables, Prev: Include statements, Up: Resource file
Special macro texts
-------------------
The text part of a resource file line may contain nine special macro
texts that may occur mixed and multiple. These macro texts start with
a `%' (percent) character, which may be quoted by a leading `\'
(backslash) character if the `%' (percent) character itself is wanted
to be used in the text part, e.g. `\%'.
*Please note:*
The optional date after the `%b...', `%y...', `%s...' and `%e...'
macro texts may be denoted either using the date format
`YYYY[MM[DD|WWW[N]]]', `YYYY*d|wN[WWW]' or
`YYYY@e|DVAR[[+|-]N[WWW]]' date format.
* Menu:
* %s macro text:: How to use the Start of event macro text.
* %e macro text:: How to use the End of event macro text.
* %b macro text:: How to use the Birthday macro text.
* %y macro text:: How to use the Year number macro text.
* %m macro text:: How to use the Month number macro text.
* %w macro text:: How to use the Week number macro text.
* %d macro text:: How to use the Day number macro text.
* %n macro text:: How to use the Textual date macro text.
* %t macro text:: How to use the Actual time macro text.
File: gcal-us.info, Node: %s macro text, Next: %e macro text, Prev: Special macro texts, Up: Special macro texts
%s macro text
.............
`%s[YYYY[MM[DD|WWW[N]]]]' references the "starting date" of the fixed
date, i.e. the first date the fixed date may occur. If the date, which
is encoded in the `%s...' macro text, is greater the current
respectively queried date, so the complete warning text will be
suppressed. If the warning text must be shown, the text of this macro
is always suppressed in output. This macro text *must* have a trailing
*whitespace* character.
* If YYYY... is not given (==*no* date encoded), the 01 January of
current year is assumed for the date.
* If YYYY is set to 0000, the current year is assumed for the year.
* If MM is not given, then 01 (==January) is assumed for the month.
* If MM is set to 00, the current month is assumed for the month.
* If DD|WWW is not given, then 01 is assumed for the day.
* If DD is set to 00, the current day is assumed for the day.
* If the N field is given (range 1...5 or 9), a WWW field must be
given then.
File: gcal-us.info, Node: %e macro text, Next: %b macro text, Prev: %s macro text, Up: Special macro texts
%e macro text
.............
`%e[YYYY[MM[DD|WWW[N]]]]' references the "ending date" of the fixed
date, i.e. the last date the fixed date may occur. If the date, which
is encoded in the `%e...' macro text, is less the current respectively
queried date, so the complete warning text will be suppressed. If the
warning text must be shown, the text of this macro is always suppressed
in output. This macro text *must* have a trailing *whitespace*
character.
* If YYYY... is not given (==*no* date encoded), the 31 December of
current year is assumed for the date.
* If YYYY is set to 0000, the current year is assumed for the year.
* If MM is not given, then 12 (==December) is assumed for the month.
* If MM is set to 00, the current month is assumed for the month.
* If DD|WWW is not given, then the last day of month MM is assumed
for the day.
* If DD is set to 00, the current day is assumed for the day.
* If the N field is given (range 1...5 or 9), a WWW field must be
given then.
File: gcal-us.info, Node: %b macro text, Next: %y macro text, Prev: %e macro text, Up: Special macro texts
%b macro text
.............
`%b[YYYY[MM[DD|WWW[N]]]]' references a "year of birth" and is
converted to an *age value*, e.g.:
The text `My %b1962 birthday%s1952 %e2062' will be expanded to
==> `My 32'nd birthday', in case the current year is 1994.
Those age values are evaluated/respeced only, if the computation of an
age value is greater zero. The fixed date warning in preceding example
is displayed only in case the current year is greater than 1952 and less
than 2062. If the warning text must be shown, the text of this macro
is always suppressed in output. This macro text *must* have a trailing
*whitespace* character.
* If YYYY... ist not given (==*no* date encoded), the current date
is assumed for the date.
* If YYYY is set to 0000, the current year is assumed for the year.
* If MM is not given or set to 00, the current month is assumed for
the month.
* If DD is not given or set to 00, the current day is assumed for
the day.
* If the N field is given (range 1...5 or 9), a WWW field must be
given then.
File: gcal-us.info, Node: %y macro text, Next: %m macro text, Prev: %b macro text, Up: Special macro texts
%y macro text
.............
`%y[YYYY[MM[DD|WWW[N]]]]' references any year and is converted to a
"year difference value", e.g.:
The text `Sylvester 1912 is %y1912 years ago' will be expanded to
==> `Sylvester 1912 is -82 years ago', in case the current year is
1994.
If the warning text must be shown, the text of this macro is always
suppressed in output. This macro text *must* have a trailing
*whitespace* character.
* If YYYY... is not given (==*no* date encoded), the current date is
assumed for the date.
* If YYYY is set to 0000, the current year is assumed for the year.
* If MM is not given or set to 00, the current month is assumed for
the month.
* If DD is not given or set to 00, the current day is assumed for
the day.
* If the N field is given (range 1...5 or 9), a WWW field must be
given then.
File: gcal-us.info, Node: %m macro text, Next: %w macro text, Prev: %y macro text, Up: Special macro texts
%m macro text
.............
`%m' references the current respectively queried "month number"
relative to the actual (==todays) date.
File: gcal-us.info, Node: %w macro text, Next: %d macro text, Prev: %m macro text, Up: Special macro texts
%w macro text
.............
`%w' references the current respectively queried "week number"
relative to the actual (==todays) date.
File: gcal-us.info, Node: %d macro text, Next: %n macro text, Prev: %w macro text, Up: Special macro texts
%d macro text
.............
`%d' references the current respectively queried "day number"
relative to the actual (==todays) date, e.g.:
A resource file line like `0 %d days gone' will be expanded to
==> `-10 days gone', in case you call Gcal with the `-c10-' option
and no command.
File: gcal-us.info, Node: %n macro text, Next: %t macro text, Prev: %d macro text, Up: Special macro texts
%n macro text
.............
`%n[[+|-]N]' references the current respectively queried "day number"
relative to the current date plus/minus N days and is converted to an
effective "date text", e.g.:
A resource file line like `1962Sep21 10000 days old: %n+10000'
will be expanded to
==> `10000 days old: Feb-06-1990', in case you call Gcal with the
simple `-c' option and the command `sep 1962' (*note `MM YYYY':
Single commands.).
File: gcal-us.info, Node: %t macro text, Prev: %n macro text, Up: Special macro texts
%t macro text
.............
`%t[12|24]' references the "actual system time", e.g.:
The text `Time: %t --> Dentist at 10:00' will be expanded to
==> `Time: 07:32 --> Dentist at 10:00', in case the actual system
time value is 07:32 (hh:mm).
A system time value is always displayed in a highlighted manner and in
*24-hour* format by default. For displaying in the *12-hour* format,
add `12' behind `%t', e.g. `%t12'.
File: gcal-us.info, Node: Date variables, Prev: Special macro texts, Up: Resource file
Date variables
--------------
Gcal respects *global* and/or *local* date variables (*note
`--date-variable=ARG': Date warning options.). This means up to *25*
user defined date variables can be set and referenced during program
execution. The name of a date variable DVAR is a single alphabetic
character (except the `e' character, which is internally reserved for
Easter Sunday's date and unassignable/unoperatable) followed by the
assignment operator character `=' and the numerical values of month and
day MMDD this variable has to store or the reference to another date
variable, e.g.:
a=1127
b=054
c=a
Only local date variables can store dynamic dates given in the
`MMWWWN' or `*d|wN[WWW]' format, e.g.:
a=03su2
b=JunMon9
x=*d10
y=*d10fri
z=*w3Su
which means, date variable A stores the date of second Sunday in March
and B stores date of last Monday in June. The date variable X stores
the date of the 10'th absolute day of the year (== 10'th January). Y
stores the date of the 10'th Friday of the year, and the assignment to
Z is the date of the Sunday, which occurs in the 3'rd week of the year.
*Caution:*
These kinds of assignments to date variables are *only* computed
correctly in simple year bounds, which means during current year, not
in fixed dates shown after the current year has changed, e.g. in
`fiscal years'.
Date variables which are defined in a resource file are always local
and and only respected in this specific file and that file, which is
included by it. This means for the included file that *all* local
variables of the caller are visible. The included file itself may
define its own local variables in its own name-space, which are not
exported to caller on return. All other definitions of date variables
(in command line, environment variable or response file) are always
global. If a resource file line contains a reference of a date
variable, which is not locally defined in that file, Gcal will try to
use the global values held by this variable. If this fails because no
global definition of this date variable is given, Gcal will not process
this line. If the simple `--debug' respectively `--debug=internal'
option is given, warning messages for each undefined date variable will
be shown (*note `--debug=internal': Global options.). If the
`--debug=abort' option is given, Gcal will abort program execution when
first undefined global date variable reference occurs. For more
information, see *Note `--debug=abort': Global options.
Only advanced users should apply the `--hidden' option, which affects
that the actual incarnation of a local date variable - which was
previously defined in a resource file and not in an included file - is
being exported to further resource files instead of using its global
value in case that date variable isn't locally defined in that further
resource file.
*Note Include statements::.
But be aware, the use of this option could produce unwanted results,
because the order of processing the resource files is an important
entity in managing the `--hidden' option, so it's not recommended using
it. You, the user, must know exactly what you're doing when applying
this option; *you are expressively warned now!*
Some basic operations can be performed on date variables.
These are:
`DVAR++'
Simple incrementation by one day.
`DVAR--'
Simple decrementation by one day.
`DVAR+=N'
Addition of a constant numeric day factor N.
`DVAR-=N'
Subtraction of a constant numeric day factor N.
The scope of the operations which are done on a local date variable,
is that resource or include file, where the local date variable is
defined.
If operations on a global date variable are performed in a resource
file or that file which is included by it, these operations are only
valid in that specific file (they are done locally), not in further
resource files processed. This means the initial values of global date
variables are always restored if the resource file changes.
Please note that each date variable assignment/operation must be
given on a single line in the resource file.
File: gcal-us.info, Node: Resource file examples, Prev: Resource file, Up: Fixed date warnings
Resource file examples
======================
Here are some examples how a resource file can look like:
; This is an example of a resource file
;
19940715 Time: %t --> Dentist at 10:00
00000921 My %b1962 birthday%s1952 %e2062
0000093 Gregorian~reformation\~is %y1752 year ago
0000Sep03 Gregorian~reformation\~is %y1752 year ago
0 Every day in every month in every year
0000 Every day in every month in every year
00000000 Every day in every month in every year
199400fri Every Friday in 1994
000007mo3 Every third Monday~in July every year less 1980%e1979
0000@e-10 Easter Sunday-10 days every year
0@e-10 Easter Sunday-10 days every year
00000000@e+10 Easter Sunday+10 days every year
a=1127
0@a+20 20 days after date of date variable `a'
a=*W10FR
0@a-1 The Thursday of the 10'th ISO-week every year
0@a The Friday of the 10'th ISO-week every year
0@a1 The Saturday of the 10'th ISO-week every year
1995*d10 The 10'th absolute day in 1995
1995*d99tue The last Tuesday in 1995
0*w99su The Sunday of the last ISO-week every year
File: gcal-us.info, Node: Todays calendar, Next: Meta Symbols, Prev: Fixed date warnings, Up: Top
Genesis of the Gregorian calendar
*********************************
The calendar that we use today was first formulated in several
inaccurate variations by the Romans. During Julius Caesar's reign,
January was falling in autumn so he ordered Sosigenes to make changes
to the calendar. He added 90 days to the year 46 B.C. to make up for
the seasonal drift and adjusted the lengths of the months as we know
them to be today. He introduced the leap year by adding one day to
February every four years. The use of the leap year was an improvement
but not entirely accurate. The true solar year is 365 days, 5 hours,
48 minutes, and 46 seconds. One 366-day year every four years equates
to an average year of 365 days, 6 hours. Every four years, an error of
44 minutes, 56 seconds was accumulated. This calendar is well known
under the term "Julian" Calendar.
By the 16'nth century, the vernal equinox occurred around March 11,
rather than March 21, so Pope Gregory XIII introduced the new style
calendar in 1582. Thursday, October 4, 1582 was followed by Friday,
October 15. Incidentally, the "Gregorian reform" compensates by 72
hours (3 days) every 400 years. The actual excess accumulated is 74
hours, 53 minutes and 20 seconds. The error of 2 hours, 53 minutes and
20 seconds every 400 years accumulates to one day in 3323 years. Oh
well, nobody is perfect.
Catholic countries adopted the Gregorian calendar almost immediately.
Most Protestant countries on the Continent adopted the new calendar
around 1700. England and the American colonies changed in 1752, by act
of Parliament. Orthodox Christian countries adopted the Gregorian
calendar later. Russia was the last European country to do so, after
the communist revolution of 1917. As a result, the USSR celebrates the
October Revolution (happened on October 25, 1917) in the old style
calendar on November 7'th.
In the English program version, Gcal assumes the Gregorian
Reformation have occurred in 1752 on the 3'rd of September.
File: gcal-us.info, Node: Meta Symbols, Next: Coding scheme, Prev: Todays calendar, Up: Top
Meta Symbols
************
Within this document the following *metasyntactic* conventions will
be used when discussing command line options and arguments:
Argument is not optional and N must be a valid number.
`e|DVAR'
Argument is not optional and must be a single alphabetic character.
`[TEXT]'
Argument is optional and TEXT is a valid alphanumeric character
constant.
`[AB]'
Arguments are optional, any number may be used in any order, e.g.:
NOTHING, A, B, AB, BA ...
`{AB}'
Arguments are not optional, minimum one up to any number may be
used in any order, e.g.:
A, B, AB, BA ...
`[A|B]'
Arguments are optional, select either A or B, but not both.
`A|B'
Arguments are not optional, select either A or B, but not both.
`[A[B]]'
Arguments are optional, select either A or AB, but not B.
`[A|B[C]]'
Arguments are optional, select A or B or AC or BC, but not C.
`[A|BC]'
Arguments are optional, select either AC or BC, but not A or B or
C.
`[A]|[B]'
Argument *lists* are optional, select either list A or list B, but
not both.
`[...]'
Additional arguments/files may be specified and are optional.
File: gcal-us.info, Node: Coding scheme, Next: Environment variables, Prev: Meta Symbols, Up: Top
Coding scheme
*************
The following coding scheme tables explain the relations between the
*date part* (YYYY...) of a resource file line and the modifiers, the
short-style option `-c|C[]', which is used for the fixed date warnings
respectively the long-style option `--period-of-fixed-dates=ARG' may
have, i.e. they point out all possible correspondences. This is
necessary because Gcal does not respect all entries found in a resource
file if a *fixed date warning* argument is given, it respects only
those entries which have a definite relation to the *fixed date
warning* argument!
In *date part* `YYYY...':
means any year number (0001...9999).
means any month number (01...12 or 99) respectively and textual
short month name with lenght of 3 characters (Jan, Feb...).
means any day number (01...28, 29, 30, 31 or 99).
means any textual short weekday name with lenght of 2...3
characters (Mon...Sun).
means any single alphabetic character.
means any number (one or more digits).
* Menu:
* Coding scheme table 1::
* Coding scheme table 2::
File: gcal-us.info, Node: Coding scheme table 1, Next: Coding scheme table 2, Prev: Coding scheme, Up: Coding scheme
Coding scheme table 1
=====================
This table opposes all possible encode variations of a date given in
the *date part* of resource file with all fitting modifiers of the
short-style option `-c|C[]'.
*Please note:*
The `-c', `-ct', `-cNd', `-c*d|wN[WWW]', `-c@e|DVAR[[+|-]N[WWW]]',
`-cMMDD' and `-cMMWWWN' options respect *all* encode variations of
the *date part*!
`*Date part of resource file*'
`*Short-style option -c|C[]*'
`00000000'
`-cN+|-'
`000000DD'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]'
`0000MM00'
`-cN+|-'
`0000MMDD'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`YYYY0000'
`-cN+|-'
`YYYY00DD'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]'
`YYYYMM00'
`-cN+|-'
`YYYYMMDD'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`000000WWW'
`-cNw|+|-', `-cw[+|-]'
`0000MMWWW'
`-cNw|+|-', `-cw[+|-]'
`YYYY00WWW'
`-cNw|+|-', `-cw[+|-]'
`YYYYMMWWW'
`-cNw|+|-', `-cw[+|-]'
`000000WWWN'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]'
`0000MMWWWN'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`YYYY00WWWN'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]'
`YYYYMMWWWN'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`0000*dN[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`YYYY*dN[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`0000*wN[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`YYYY*wN[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`0000@?[+|-]N[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
`YYYY@?[+|-]N[WWW]'
`-cNw|+|-', `-cw[+|-]', `-cm[+|-]', `-cy[+|-]', `-clNd|w|+|-',
`-cl*d|wN[WWW]',
`-cl@e|DVAR[[+|-]N[WWW]]', `-clMMDD', `-clMMWWWN'
File: gcal-us.info, Node: Coding scheme table 2, Prev: Coding scheme table 1, Up: Coding scheme
Coding scheme table 2
=====================
This table opposes all possible encode variations of the short-style
option `-c|C[]' with all fitting modifiers of a date given in the *date
part* of resource file.
`*Short-style option -c|C[]*'
`*Date part of resource file*'
`-ct'
`-cNd|+|-'
`-cMMDD'
`-cMMWWWN'
`-c*d|wN[WWW]'
`-c@e|DVAR[[+|-]N[WWW]]'
`00000000', `0000MM00', `YYYY0000', `YYYYMM00', `000000DD',
`0000MMDD', `YYYY00DD', `YYYYMMDD', `000000WWW', `0000MMWWW',
`YYYY00WWW', `YYYYMMWWW', `000000WWWN', `0000MMWWWN', `YYYY00WWWN',
`YYYYMMWWWN', `0000*dN', `0000*dNWWW', `YYYY*dN', `YYYY*dNWWW',
`0000*wN', `0000*wNWWW', `YYYY*wN', `YYYY*wNWWW', `0000@?[+|-]N',
`0000@?[+|-]NWWW', `YYYY@?[+|-]N', `YYYY@?[+|-]NWWW'
`-cw[+|-]'
`-cNw'
`000000DD', `0000MMDD', `YYYY00DD', `YYYYMMDD', `000000WWW',
`0000MMWWW', `YYYY00WWW', `YYYYMMWWW', `000000WWWN', `0000MMWWWN',
`YYYY00WWWN', `YYYYMMWWWN', `0000*dN', `0000*dNWWW', `YYYY*dN',
`YYYY*dNWWW', `0000*wN', `0000*wNWWW', `YYYY*wN', `YYYY*wNWWW',
`0000@?[+|-]N', `0000@?[+|-]NWWW', `YYYY@?[+|-]N',
`YYYY@?[+|-]NWWW'
`-cm[+|-]'
`000000DD', `0000MMDD', `YYYY00DD', `YYYYMMDD', `000000WWWN',
`0000MMWWWN', `YYYY00WWWN', `YYYYMMWWWN', `0000*dN', `0000*dNWWW',
`YYYY*dN', `YYYY*dNWWW', `0000*wN', `0000*wNWWW', `YYYY*wN',
`YYYY*wNWWW', `0000@?[+|-]N', `0000@?[+|-]NWWW', `YYYY@?[+|-]N',
`YYYY@?[+|-]NWWW'
`-cy[+|-]'
`-clNd|w|+|-'
`-clMMDD'
`-clMMWWWN'
`-cl*d|wN[WWW]'
`-cl@e|DVAR[[+|-]N[WWW]]'
`0000MMDD', `YYYYMMDD', `0000MMWWWN', `YYYYMMWWWN', `0000*dN',
`0000*dNWWW', `YYYY*dN', `YYYY*dNWWW', `0000*wN', `0000*wNWWW',
`YYYY*wN', `YYYY*wNWWW', `0000@?[+|-]N', `0000@?[+|-]NWWW',
`YYYY@?[+|-]N', `YYYY@?[+|-]NWWW'
File: gcal-us.info, Node: Environment variables, Next: Error codes, Prev: Coding scheme, Up: Top
Environment variables
*********************
Here is a list of all environment variables which are used by Gcal:
`COLUMNS'
Sets the number of columns on the screen. Takes precedence over
the number of columns specified by the `TERM' environment variable
or the system itself.
`HOME'
Name of the users home directory (used to find the `.gcalrc' file).
Takes precedence over `GCALPATH', `GCAL_USR_LIBDIR' and
`GCAL_SYS_LIBDIR'.
`GCAL'
Flags which are passed to Gcal automatically.
`GCALANSI'
If defined or set, ANSI escape highlighting sequences are used
respectively substituted by default if no other highlighting
sequences are defined by command line option or found in the
Termcap library.
`GCALPATH'
(`:') colon-separated list of directories which are searched to
find the `.gcalrc' file. Takes precedence over `GCAL_USR_LIBDIR'
and `GCAL_SYS_LIBDIR'.
`GCAL_USR_LIBDIR'
Name of a directory relative to `HOME' directory, where user stores
personal respectively *private access* resource files (dates
files). Takes precedence over `GCAL_SYS_LIBDIR'.
`GCAL_SYS_LIBDIR'
Name of a directory absolute *root*/*$(prefix)* directory, where
the system-administrator stores common respectively *public access*
resource files (dates files).
`LINES'
Sets the number of lines on the screen. Takes precedence over the
number of lines specified by the `TERM' environment variable or
the system itself.
`PAGER'
Name of the *external* pager program, which is used if the paging
option `-p' respectively `--pager' is wanted.
`PATH'
(`:') colon-separated list of directories which are searched to
find the *external pager* program. *Note `--pager': Global
options, for more details.
`TERM'
The type of terminal on which Gcal is being run.
File: gcal-us.info, Node: Error codes, Next: Argument Index, Prev: Environment variables, Up: Top
Error codes
***********
Gcal produces the following *exit* codes:
`127'
Request for help screen, software license or program version
(adjustable).
`126'
Invalid command line argument / option.
`125'
Year out of range for computing Easter Sunday's date.
`124'
Virtual memory exhausted.
`123'
Invalid date part in resource file.
`122'
Invalid month field entry in resource file.
`121'
Invalid day field entry in resource file.
`120'
Malformed *#include* statement in resource file.
`119'
Illegal sub-*#include* statement in resource file.
`118'
Resource file respectively include file not found.
`117'
Invalid N'th weekday field (only 1...5 or 9 valid).
`116'
Missing *whitespace* character between *date part* and *text part*.
`115'
Response file respectively shell script can't be written.
`114'
Invalid date variable operation.
`113'
Referenced date variable undefined.
`112'
Invalid date value assigned to date variable.
`111'
Sending output to Email address fails.
`110'
Internal error, C Function pipe(), fork() or execlp() fails.
`109'
Error reading resource respectively response file.
Activated `-c|C[]' or `-f|F NAME[+...]' option causes no output of
resource file entries.
Normal program termination.